﻿using System;
using System.Collections.Generic;
using System.Text;

namespace IceDog.DNL.CSharp.DesignPattern.FacadePattern.DellPC
{
    public class DellComputer:IBaseAction
    {
        private readonly Cpu _cpu;
        private readonly Memory _memory;
        private readonly Disk _disk;
        
        public DellComputer()
        {
            _cpu = new Cpu();
            _memory = new Memory();
            _disk = new Disk();
        }
        public void Startup()
        {
            Console.WriteLine("start the computer!");
            _cpu.Startup();
            _memory.Startup();
            _disk.Startup();
            Console.WriteLine("start computer finished!");
        }

        public void Shutdown()
        {
            Console.WriteLine("begin to close the computer!");
            _cpu.Shutdown();
            _memory.Shutdown();
            _disk.Shutdown();
            Console.WriteLine("computer closed!");
        }
    }
}
